zack commited on
Commit
3629bf4
·
1 Parent(s): b694625

feat: update Dockerfile and index page \U0001F4DD

Browse files
Files changed (2) hide show
  1. frontend/Dockerfile +1 -1
  2. frontend/pages/index.js +3 -3
frontend/Dockerfile CHANGED
@@ -1,5 +1,5 @@
1
  # Specify the base image
2
- FROM node:18.17.0
3
 
4
  # Set the working directory in the container
5
  WORKDIR /app
 
1
  # Specify the base image
2
+ FROM node:alpine
3
 
4
  # Set the working directory in the container
5
  WORKDIR /app
frontend/pages/index.js CHANGED
@@ -1,10 +1,10 @@
1
- import React, { useEffect } from 'react';
2
  import ReactDOM from 'react-dom/client';
3
  import App from './_app';
4
  import reportWebVitals from '../src/reportWebVitals';
5
 
6
  // Function to render the app only on the client-side
7
- const renderApp = () => {
8
  const root = ReactDOM.createRoot(document.getElementById('Gradio-Flow'));
9
  root.render(
10
  <React.StrictMode>
@@ -18,4 +18,4 @@ if (typeof window !== 'undefined') {
18
  renderApp();
19
  }
20
 
21
- reportWebVitals();
 
1
+ import React from 'react';
2
  import ReactDOM from 'react-dom/client';
3
  import App from './_app';
4
  import reportWebVitals from '../src/reportWebVitals';
5
 
6
  // Function to render the app only on the client-side
7
+ export default function renderApp() {
8
  const root = ReactDOM.createRoot(document.getElementById('Gradio-Flow'));
9
  root.render(
10
  <React.StrictMode>
 
18
  renderApp();
19
  }
20
 
21
+ reportWebVitals();