Skip to content

Commit

Permalink
fix #28 \add footer
Browse files Browse the repository at this point in the history
  • Loading branch information
gkorland committed Jan 21, 2024
1 parent 18d28d5 commit b03b61d
Show file tree
Hide file tree
Showing 5 changed files with 2,916 additions and 4 deletions.
3 changes: 3 additions & 0 deletions components/custom/github-mark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions components/custom/navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { Switch } from "../ui/switch";
import { Label } from "../ui/label";
import { useEffect, useState } from "react";
import { useTheme } from "next-themes";
import GithubMark from "./github-mark.svg";

export default function Navbar() {
const { data: session, status } = useSession()
Expand Down Expand Up @@ -84,6 +85,11 @@ export default function Navbar() {
</li>
</ul>
}
<footer className="flex flex-row items-center space-x-1 fixed bottom-1 text-xs">
<a href="https://github.com/falkordb/falkordb-browser"><GithubMark className="h-4 w-4" /></a>
<span>Made by</span>
<a className="underline" href="https://www.falkordb.com">FalkorDB</a>
</footer>
</nav>
)
}
35 changes: 31 additions & 4 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,36 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
images: {
unoptimized: true
}
reactStrictMode: true,
images: {
unoptimized: true
},
webpack(config) {
// Grab the existing rule that handles SVG imports
const fileLoaderRule = config.module.rules.find((rule) =>
rule.test?.test?.('.svg'),
)

config.module.rules.push(
// Reapply the existing rule, but only for svg imports ending in ?url
{
...fileLoaderRule,
test: /\.svg$/i,
resourceQuery: /url/, // *.svg?url
},
// Convert all other *.svg imports to React components
{
test: /\.svg$/i,
issuer: fileLoaderRule.issuer,
resourceQuery: { not: [...fileLoaderRule.resourceQuery.not, /url/] }, // exclude if *.svg?url
use: ['@svgr/webpack'],
},
)

// Modify the file loader rule to ignore *.svg, since we have it handled now.
fileLoaderRule.exclude = /\.svg$/i

return config
},
}

module.exports = nextConfig
Loading

0 comments on commit b03b61d

Please sign in to comment.