Skip to content

Commit

Permalink
Next.js Layout Structure, Loading.js, and Global Components
Browse files Browse the repository at this point in the history
  • Loading branch information
15Dkatz committed Jul 7, 2023
1 parent d689d27 commit 3b72409
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 33 deletions.
2 changes: 1 addition & 1 deletion app/connect/email-list/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { useState, useTransition } from 'react';
import postContact from './post-contact';
import Spinner from './spinner';
import Spinner from 'components/spinner';

export default function Form() {
const [message, setMessage] = useState('');
Expand Down
16 changes: 16 additions & 0 deletions app/connect/layout.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
export const metadata = { title: 'Connect with David Kando' };

export default function Layout({ children }) {
return (
<div
className={
`w-full flex flex-col justify-center items-center
p-5 p-10 lg:p-10 text-md lg:text-xl
bg-gradient-to-b from-slate-100 to-pink-100`
}
>
<div className="title">Let's hang around</div>
<div>{children}</div>
</div>
)
}
9 changes: 9 additions & 0 deletions app/connect/loading.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import Spinner from 'components/spinner';

export default function Loading() {
return (
<div className="min-h-screen p-5">
<Spinner />
</div>
)
}
55 changes: 23 additions & 32 deletions app/connect/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,30 @@ import Followers from './followers';

export default function Page() {
return (
<div
className={
`w-full flex flex-col justify-center items-center
p-5 p-10 lg:p-10 text-md lg:text-xl
bg-gradient-to-b from-slate-100 to-pink-100`
}
>
<div className="title">Let's hang around</div>
<>
<div>
<div>
Find my latest projects, upcoming live events, and releases!
</div>
<br />
<div>
1. Support me with a follow on{' '}
<a className="font-bold link" href="https://open.spotify.com/artist/6ep6Hvwexmaa5IqcPxMxqC?si=t24Vsf6LRsKSIy5lV0wvNw" target="_blank">Spotify</a>.
</div>
<Followers />
<br />
<div>
2. Follow me on{' '}
<a className="font-bold link" href="https://www.instagram.com/davidkandomusic/" target="_blank">instagram</a>.
</div>
<br />
<div>
3. Join my email list.
</div>
<Form />
<br />
<div>
Reach out for inquiries at <span className="underline">[email protected]</span>
</div>
Find my latest projects, upcoming live events, and releases!
</div>
</div>
<br />
<div>
1. Support me with a follow on{' '}
<a className="font-bold link" href="https://open.spotify.com/artist/6ep6Hvwexmaa5IqcPxMxqC?si=t24Vsf6LRsKSIy5lV0wvNw" target="_blank">Spotify</a>.
</div>
<Followers />
<br />
<div>
2. Follow me on{' '}
<a className="font-bold link" href="https://www.instagram.com/davidkandomusic/" target="_blank">instagram</a>.
</div>
<br />
<div>
3. Join my email list.
</div>
<Form />
<br />
<div>
Reach out for inquiries at <span className="underline">[email protected]</span>
</div>
</>
)
}
File renamed without changes.

0 comments on commit 3b72409

Please sign in to comment.