Skip to content

Commit

Permalink
fix image paths
Browse files Browse the repository at this point in the history
  • Loading branch information
craigrbarnes committed Dec 10, 2024
1 parent a2169a1 commit fbc4acf
Show file tree
Hide file tree
Showing 17 changed files with 9,992 additions and 2,944 deletions.
2 changes: 0 additions & 2 deletions .env.development
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
BASE_PATH=/ff
GEN3_COMMONS_NAME=brh
NEXT_PUBLIC_GEN3_API='https://brhstaging.data-commons.org'
NEXT_PUBLIC_GEN3_AI_SEARCH_API='https://brhstaging.data-commons.org/ai'
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.css
node_modules
56 changes: 56 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
module.exports = {
env: {
browser: true,
es2021: true,
node: true,
},
extends: [
'eslint:recommended',
'plugin:jsx-a11y/recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@next/next/recommended',
'prettier',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 12,
sourceType: 'module',
},
plugins: ['jsx-a11y', 'react', 'react-hooks', '@typescript-eslint'],
rules: {
'@typescript-eslint/no-explicit-any':['warn'],
'no-underscore-dangle': 'off',
'import/prefer-default-export': 'off',
'linebreak-style': ['error', 'unix'],
'@typescript-eslint/quotes': ['warn', 'single'],
quotes: ['warn', 'single'],
'jsx-quotes': ['warn', 'prefer-double'],
semi: ['error', 'always'],
'prefer-destructuring': ['error', { object: true, array: false }],
'react/jsx-fragments': ['warn', 'element'],
// disable these because we're using React 17+ with the jsx transform
'react/jsx-uses-react': 'off',
'react/react-in-jsx-scope': 'off',
},
overrides: [
{
files: ['**/*.tsx'],
rules: {
'react/prop-types': 'off',
},
},
],
settings: {
react: {
version: 'detect',
},
next: {
rootDir: './',
},
},
};
3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "next/core-web-vitals"
}
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Build stage
FROM node:20-slim AS builder

ARG NEXT_PUBLIC_PORTAL_BASENAME=/ff

WORKDIR /gen3

COPY ./package.json ./package-lock.json ./next.config.js ./tsconfig.json ./.env.development ./tailwind.config.js ./postcss.config.js ./
Expand All @@ -15,7 +17,6 @@ RUN npm install @swc/core @napi-rs/magic-string && \
FROM node:20-slim AS runner

WORKDIR /gen3
ENV PORT=3000

RUN addgroup --system --gid 1001 nextjs && \
adduser --system --uid 1001 nextjs
Expand Down
2 changes: 1 addition & 1 deletion config/brh/discovery.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"features": {
"dataFetchFunction": "AggMDSAllLocal",
"aiSearch": true,
"aiSearch": false,
"advSearchFilters": {
"enabled": false,
"field": "advSearchFilters",
Expand Down
2 changes: 1 addition & 1 deletion config/brh/login.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"className": "text-center text-sm"
}
],
"image": "images/brh/gene_bgy.png",
"image": "/images/gene_side_texture.svg",
"email": "[email protected]",
"showCredentialsLogin" : true
}
5 changes: 3 additions & 2 deletions config/brh/navigation.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"src": "/images/brh/logo.png",
"height": 256,
"width": 320,
"href": "/Discovery"
"href": "/"
},
"items": [
{
Expand Down Expand Up @@ -72,7 +72,8 @@
"classNames": {
"root": "border-base-light text-primary-contrast-dark",
"label": "text-primary-contrast",
"button": "hover:border-white"
"button": "hover:border-white",
"login" : "hover:border-white text-white"
}
}
}
36 changes: 30 additions & 6 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,51 @@ const withMDX = require('@next/mdx')({
},
});


// Next configuration with support for rewrting API to existing common services
const nextConfig = {
output: 'standalone',
reactStrictMode: true,
pageExtensions: ['mdx', 'md', 'jsx', 'js', 'tsx', 'ts'],
basePath: process.env.BASE_PATH || '',
basePath: process.env.NEXT_PUBLIC_PORTAL_BASENAME || '',
transpilePackages: ['@gen3/core', '@gen3/frontend'],
webpack: (config) => {
config.infrastructureLogging = {
level: "error",
level: 'error',
};
return config;
},
experimental: {
esmExternals: true,
instrumentationHook: true,
turbo: {
moduleIdStrategy: 'deterministic',
},
},
async headers() {
return [
{
source: "/(.*)?", // Matches all pages
source: '/(.*)?', // Matches all pages
headers: [
{
key: 'X-Frame-Options',
value: 'SAMEORIGIN',
},
],
},
{
source: '/jupyter/(.*)?',
headers: [
{
key: "X-Frame-Options",
value: "SAMEORIGIN",
key: 'X-Frame-Options',
value: 'SAMEORIGIN',
},
{
key: 'Cross-Origin-Embedder-Policy',
value: 'require-corp',
},
{
key: 'Cross-Origin-Opener-Policy',
value: 'same-origin',
},
],
},
Expand Down
Loading

0 comments on commit fbc4acf

Please sign in to comment.