Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
21
Issues
21
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SRCT
go
Commits
17a510da
Commit
17a510da
authored
Feb 13, 2019
by
David Haynes
🙆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Scaffolding for "New Link"
- imitation is the sincerest form of flattery
parent
32312625
Pipeline
#3877
failed with stage
in 1 minute and 23 seconds
Changes
9
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
59 additions
and
21 deletions
+59
-21
go/go_ahead/src/Components/Molecules/NewGoLinkValidator.js
go/go_ahead/src/Components/Molecules/NewGoLinkValidator.js
+15
-0
go/go_ahead/src/Components/Organisms/NavBar.jsx
go/go_ahead/src/Components/Organisms/NavBar.jsx
+2
-2
go/go_ahead/src/Components/Organisms/NewGoLinkForm.jsx
go/go_ahead/src/Components/Organisms/NewGoLinkForm.jsx
+13
-0
go/go_ahead/src/Components/Organisms/index.js
go/go_ahead/src/Components/Organisms/index.js
+2
-1
go/go_ahead/src/Components/Pages/DhaynesPage.jsx
go/go_ahead/src/Components/Pages/DhaynesPage.jsx
+0
-11
go/go_ahead/src/Components/Pages/NewGolinkPage.jsx
go/go_ahead/src/Components/Pages/NewGolinkPage.jsx
+19
-0
go/go_ahead/src/Components/Pages/index.js
go/go_ahead/src/Components/Pages/index.js
+2
-2
go/go_ahead/src/Components/index.js
go/go_ahead/src/Components/index.js
+4
-3
go/go_ahead/src/Utils/Routes.jsx
go/go_ahead/src/Utils/Routes.jsx
+2
-2
No files found.
go/go_ahead/src/Components/Molecules/NewGoLinkValidator.js
0 → 100644
View file @
17a510da
import
*
as
Yup
from
"
yup
"
;
const
NewGoLinkValidator
=
Yup
.
object
().
shape
({
destination
:
Yup
.
string
()
.
url
()
.
max
(
1000
,
"
Too Long!
"
),
short
:
Yup
.
string
()
.
required
(
"
Required
"
)
.
max
(
20
,
"
Too Long!
"
),
expires
:
Yup
.
date
()
.
nullable
()
.
min
(
new
Date
())
});
export
default
NewGoLinkValidator
;
go/go_ahead/src/Components/Organisms/NavBar.jsx
View file @
17a510da
...
...
@@ -34,8 +34,8 @@ const NavBar = props => {
<
Collapse
isOpen
=
{
!
collapsed
}
navbar
>
<
Nav
className
=
"mx-auto"
navbar
>
<
NavItem
>
<
NavLink
href
=
"#/
dhaynes"
active
=
{
pathname
==
"
/dhaynes
"
}
>
Dhaynes
<
NavLink
href
=
"#/
new"
active
=
{
pathname
==
"
/new
"
}
>
New Link
</
NavLink
>
</
NavItem
>
<
NavItem
>
...
...
go/go_ahead/src/Components/Organisms/NewGoLinkForm.jsx
0 → 100644
View file @
17a510da
import
React
,
{
useState
}
from
"
react
"
;
import
NewGoLinkValidator
from
"
../Molecules/NewGoLinkValidator
"
;
import
{
Formik
,
Field
,
Form
,
ErrorMessage
}
from
"
formik
"
;
import
{
GetCSRFToken
}
from
"
../../Utils/GetCSRFToken
"
;
import
{
SingleDatePicker
}
from
"
react-dates
"
;
const
NewGoLinkForm
=
props
=>
{
const
[
focused
,
setFocused
]
=
useState
(
false
);
return
<
div
/>;
};
export
default
NewGoLinkForm
;
go/go_ahead/src/Components/Organisms/index.js
View file @
17a510da
import
NavBar
from
"
./NavBar
"
;
import
NewGoLinkForm
from
"
./NewGoLinkForm
"
;
export
{
NavBar
};
export
{
NavBar
,
NewGoLinkForm
};
go/go_ahead/src/Components/Pages/DhaynesPage.jsx
deleted
100644 → 0
View file @
32312625
import
React
from
"
react
"
;
import
{
PageTemplate
}
from
"
Components
"
;
const
DhaynesPage
=
()
=>
(
<
PageTemplate
>
<
h2
>
DAVID HAYNES
</
h2
>
</
PageTemplate
>
);
export
default
DhaynesPage
;
go/go_ahead/src/Components/Pages/NewGolinkPage.jsx
0 → 100644
View file @
17a510da
import
React
from
"
react
"
;
import
AuthedPageTemplate
from
"
../Templates/AuthedPageTemplate
"
;
import
NewGolinkForm
from
"
../Organisms/NewGoLinkForm
"
;
const
NewGoLinkPage
=
props
=>
{
return
(
<
AuthedPageTemplate
>
<
h2
className
=
"mt-4"
>
Create a new Go link
</
h2
>
<
p
className
=
"text-muted"
>
A Go link is composed of the original "target" URL, and the shortcode to
be used in the Go link.
</
p
>
<
legend
/>
<
NewGolinkForm
/>
</
AuthedPageTemplate
>
);
};
export
default
NewGoLinkPage
;
go/go_ahead/src/Components/Pages/index.js
View file @
17a510da
import
HomePage
from
"
./HomePage
"
;
import
AboutPage
from
"
./AboutPage
"
;
import
DhaynesPage
from
"
./DhaynesPage
"
;
import
DebugCRUD
from
"
./DebugCRUD
"
;
import
NewGoLinkPage
from
"
./NewGoLinkPage
"
;
export
{
HomePage
,
AboutPage
,
D
haynesPage
,
DebugCRUD
};
export
{
HomePage
,
AboutPage
,
D
ebugCRUD
,
NewGoLinkPage
};
go/go_ahead/src/Components/index.js
View file @
17a510da
...
...
@@ -5,8 +5,8 @@ import {
DebugDelete
,
DebugUpdate
}
from
"
./Molecules
"
;
import
{
NavBar
}
from
"
./Organisms
"
;
import
{
HomePage
,
AboutPage
,
D
haynesPage
,
DebugCRUD
}
from
"
./Pages
"
;
import
{
NavBar
,
NewGoLinkForm
}
from
"
./Organisms
"
;
import
{
HomePage
,
AboutPage
,
D
ebugCRUD
,
NewGoLinkPage
}
from
"
./Pages
"
;
import
{
PageTemplate
,
AuthedPageTemplate
}
from
"
./Templates
"
;
export
{
...
...
@@ -18,11 +18,12 @@ export {
DebugUpdate
,
//Organisms
NavBar
,
NewGoLinkForm
,
//Pages
HomePage
,
AboutPage
,
DhaynesPage
,
DebugCRUD
,
NewGoLinkPage
,
//Templates
PageTemplate
,
AuthedPageTemplate
...
...
go/go_ahead/src/Utils/Routes.jsx
View file @
17a510da
...
...
@@ -3,9 +3,9 @@ import { Route, withRouter, Switch } from "react-router-dom";
import
{
NavBar
}
from
"
Components
"
;
const
Home
=
lazy
(()
=>
import
(
"
../Components/Pages/HomePage
"
));
const
Dhaynes
=
lazy
(()
=>
import
(
"
../Components/Pages/DhaynesPage
"
));
const
About
=
lazy
(()
=>
import
(
"
../Components/Pages/AboutPage
"
));
const
DebugCRUD
=
lazy
(()
=>
import
(
"
../Components/Pages/DebugCRUD
"
));
const
NewGoLinkPage
=
lazy
(()
=>
import
(
"
../Components/Pages/NewGoLinkPage
"
));
const
NavBarWithRouter
=
withRouter
(
props
=>
<
NavBar
{
...
props
}
/>);
...
...
@@ -15,9 +15,9 @@ const Routes = () => (
<
Suspense
fallback
=
{
<
div
>
Loading...
</
div
>
}
>
<
Switch
>
<
Route
path
=
"/"
exact
component
=
{
Home
}
/>
<
Route
path
=
"/dhaynes"
component
=
{
Dhaynes
}
/>
<
Route
path
=
"/about"
component
=
{
About
}
/>
<
Route
path
=
"/debug"
component
=
{
DebugCRUD
}
/>
<
Route
path
=
"/new"
component
=
{
NewGoLinkPage
}
/>
<
Route
render
=
{
()
=>
<
div
>
404
</
div
>
}
/>
</
Switch
>
</
Suspense
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment