Skip to content

Commit

Permalink
Redesign the index page for newly generated blitz projects (#3987)
Browse files Browse the repository at this point in the history
* redesign index page for full app template

* pnpmlock

* iteration 2

* Add padding around blitz logo

* Fix more padding

* update padding for logo and button container

* increase max-width

* final draft

* address comments

Co-authored-by: Brandon Bayer <[email protected]>
  • Loading branch information
Dillon Raphael and flybayer authored Jan 11, 2023
1 parent 57101e9 commit 7abfb90
Show file tree
Hide file tree
Showing 13 changed files with 892 additions and 450 deletions.
5 changes: 5 additions & 0 deletions .changeset/tricky-kids-press.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@blitzjs/generator": minor
---

Redesign the index page for newly generated blitz projects
2 changes: 1 addition & 1 deletion packages/generator/templates/app/package.js.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@blitzjs/rpc": "latest",
"@prisma/client": "4.6.0",
"blitz": "latest",
"next": "12.2.5",
"next": "13.1",
"prisma": "4.6.0",
"react": "18.2.0",
"react-dom": "18.2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/generator/templates/app/package.ts.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@blitzjs/rpc": "latest",
"@prisma/client": "4.6.0",
"blitz": "latest",
"next": "12.2.5",
"next": "13.1",
"prisma": "4.6.0",
"react": "18.2.0",
"react-dom": "18.2.0",
Expand Down
11 changes: 6 additions & 5 deletions packages/generator/templates/app/src/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import {ErrorFallbackProps, ErrorComponent, ErrorBoundary, AppProps} from "@blitzjs/next"
import {AuthenticationError, AuthorizationError} from "blitz"
import { ErrorFallbackProps, ErrorComponent, ErrorBoundary, AppProps } from "@blitzjs/next"
import { AuthenticationError, AuthorizationError } from "blitz"
import React from "react"
import {withBlitz} from "src/blitz-client"
import { withBlitz } from "src/blitz-client"
import 'src/styles/globals.css'

function RootErrorFallback({error}: ErrorFallbackProps) {
function RootErrorFallback({ error }: ErrorFallbackProps) {
if (error instanceof AuthenticationError) {
return <div>Error: You are not authenticated</div>
} else if (error instanceof AuthorizationError) {
Expand All @@ -23,7 +24,7 @@ function RootErrorFallback({error}: ErrorFallbackProps) {
}
}

function MyApp({Component, pageProps}: AppProps) {
function MyApp({ Component, pageProps }: AppProps) {
const getLayout = Component.getLayout || ((page) => page)
return (
<ErrorBoundary FallbackComponent={RootErrorFallback}>
Expand Down
Loading

0 comments on commit 7abfb90

Please sign in to comment.