Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
node-version-file: .nvmrc
cache: npm
- run: npm ci
env:
DATABASE_URL: postgresql://sidecause:sidecause@localhost:5432/sidecause?schema=public
- run: npm run format:check
- run: npm run lint
- run: npm run typecheck
Expand Down
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ ENV NEXT_TELEMETRY_DISABLED=1

FROM base AS dependencies
COPY package.json package-lock.json ./
RUN npm ci
COPY prisma.config.ts ./
COPY prisma ./prisma
RUN DATABASE_URL=postgresql://sidecause:sidecause@localhost:5432/sidecause?schema=public npm ci

FROM dependencies AS development
COPY . .
Expand All @@ -25,7 +27,7 @@ RUN addgroup --system --gid 1001 nodejs \
&& adduser --system --uid 1001 nextjs
COPY --from=build --chown=nextjs:nodejs /workspace/package.json ./package.json
COPY --from=build --chown=nextjs:nodejs /workspace/package-lock.json ./package-lock.json
RUN npm ci --omit=dev && npm cache clean --force
RUN npm ci --omit=dev --ignore-scripts && npm cache clean --force
COPY --from=build --chown=nextjs:nodejs /workspace/.next ./.next
USER nextjs
EXPOSE 3000
Expand Down
2 changes: 1 addition & 1 deletion app/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default function Navbar({ session }: NavbarProps) {
<Link href="/">SideCause</Link>
</li>
<li>
<Link href="/">Posts</Link>
<Link href="/posts">Posts</Link>
</li>
{session?.user ? (
<>
Expand Down
8 changes: 6 additions & 2 deletions app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ p {
align-items: end;
padding: 1.5rem 1.5rem;
background:
linear-gradient(15deg, transparent 0 22%, rgba(75, 194, 188, 0.44) 82% 100%),
linear-gradient(
15deg,
transparent 0 22%,
rgba(75, 194, 188, 0.44) 82% 100%
),
var(--accent-soft);
}

Expand Down Expand Up @@ -160,7 +164,7 @@ h3 {
}

.account-panel__intro {
margin-top: .25rem;
margin-top: 0.25rem;
color: var(--muted);
}

Expand Down
17 changes: 4 additions & 13 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,21 @@ import './globals.css'
import Navbar from './Navbar'
import { auth } from '../auth'

export default async function RootLayout({

export const metadata: Metadata = {
title: 'SideCause',
description:
'Complete community service projects and level up!',
description: 'Complete community service projects and level up!',
}

const navLinks = [
{ text: 'SideCause', url: '/' },
{ text: 'Posts', url: '/posts' },
{ text: 'Login', url: '/login' }
];

export default function RootLayout({
export default async function RootLayout({
children,
}: Readonly<{ children: ReactNode }>) {
const session = await auth()

return (
<html lang="en">
<body>
<body>
<div>
<Navbar links={navLinks} />
<Navbar session={session} />
</div>
{children}
</body>
Expand Down
Loading