Skip to content

Commit

Permalink
resolve static image path
Browse files Browse the repository at this point in the history
  • Loading branch information
jaismith committed May 14, 2024
1 parent a00b068 commit fc3abc3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion client/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default function App({ Component, pageProps }: any) {
name='viewport'
content='minimum-scale=1, initial-scale=1, width=device-width, user-scalable=no'
/>
<link rel='shortcut icon' href='static/favicon.png' />
<link rel='shortcut icon' href='/static/favicon.png' />
</Head>
<Component {...pageProps} />
</MantineProvider>
Expand Down
2 changes: 1 addition & 1 deletion client/pages/sites/[site].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const Index = ({ forecast: prefetchedForecast }: IndexPageProps) => {
<Group justify='space-between'>
<Flex gap='sm'>
<Image
src="static/logo.png"
src="/static/logo.png"
component="img"
alt='decorative logo'
style={{ width: 30 }}
Expand Down
12 changes: 5 additions & 7 deletions infra/lib/flowcast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,16 +310,14 @@ export class FlowcastStack extends Stack {
// * client

const client = new Nextjs(this, 'nextjs-client', {
nextjsPath: path.join(__dirname, '../../client')
nextjsPath: path.join(__dirname, '../../client'),
domainProps: {
domainName: WEB_APP_DOMAIN,
hostedZone: hostedZone
}
});
new cdk.CfnOutput(this, "nextjs-client-distribution-domain", {
value: client.distribution.distributionDomain,
});

new route53.ARecord(this, 'nextjs-client-alias-record', {
zone: hostedZone,
recordName: WEB_APP_DOMAIN,
target: route53.RecordTarget.fromAlias(new route53Targets.CloudFrontTarget(client.distribution.distribution))
});
}
}

0 comments on commit fc3abc3

Please sign in to comment.