Skip to content

Commit

Permalink
Merge pull request #3 from dheeraj7070/main
Browse files Browse the repository at this point in the history
Image bug fixed
  • Loading branch information
sonu36437 authored Nov 9, 2023
2 parents ba62fac + cbecf20 commit f0c3a25
Show file tree
Hide file tree
Showing 11 changed files with 138 additions and 5 deletions.
130 changes: 130 additions & 0 deletions client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
2 changes: 1 addition & 1 deletion client/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const App =()=>{
<Route path='/' exact Component={Homepage}/>
<Route path='/login' exact Component={Login}/>
<Route path='/register' exact Component={Register}/>
<Route path='/dashboard' exact Component={Dashboard}/>
<Route path='/dashboard' exact Component={Homepage}/>
<Route path='/admin' exact Component={Admin}/>
{/* <Route path='/upload' exact Component={Admin}/> */}
<Route path='/report' exact Component={Repot}/>
Expand Down
5 changes: 3 additions & 2 deletions client/src/pages/admin.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { useEffect, useState } from "react";
import "bootstrap/dist/css/bootstrap.css";
import "bootstrap/js/src/dropdown";

import "bootstrap/dist/js/bootstrap";
import './style.css'


Expand Down Expand Up @@ -43,7 +44,7 @@ export default function YourComponent() {
<div className="AllCardContainer">
{data.map((item, index) => (
<div key={index} className="card mt-4" style={{ width: "20rem" }}>
<img className="card-img-top" src={item.image[0]} alt={item.alt} />
<img className="card-img-top" src={"http://localhost:1337/" + item.image[0]} alt={item.alt} />
<div className="card-body">
<h5 className="card-title">{item.title}</h5>
<p className="card-text">
Expand Down
2 changes: 1 addition & 1 deletion client/src/pages/dashboard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export default function dashboard(){
<div className="AllCardContainer">
{data.map((item, index) => (
<div key={index} className="card mt-4" style={{ width: "20rem" }}>
<img className="card-img-top" src={item.image[0]} alt={item.alt} />
<img className="card-img-top" src={"http://localhost:1337/" + item.image[0]} alt={item.alt} />
<div className="card-body">
<h5 className="card-title">{item.title}</h5>
<p className="card-text">
Expand Down
2 changes: 1 addition & 1 deletion client/src/pages/homePage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export default function homepage(){
<div className="AllCardContainer">
{data.map((item, index) => (
<div key={index} className="card mt-4" style={{ width: "20rem" }}>
<img className="card-img-top" src={item.image[0]}height='220rem' alt={item.alt} />
<img className="card-img-top" src={"http://localhost:1337/" + item.image[0]}height='220rem' alt={item.alt} />
<div className="card-body">
<h5 className="card-title">{item.title}</h5>
<p className="card-text">
Expand Down
Empty file removed client/src/pages/homepage.css
Empty file.
2 changes: 2 additions & 0 deletions server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ const user = require("./models/user");

app.use(express.json());
app.use(cors());
app.use("/uploads",express.static("uploads"));


mongoose.connect("mongodb://127.0.0.1:27017/civilians").then(() => {
console.log("connection succeded");
Expand Down
Binary file removed server/uploads/1699519696632_Untitled.png
Binary file not shown.
Binary file removed server/uploads/1699519745820_Untitled.png
Binary file not shown.
Binary file removed server/uploads/1699523140883_Untitled.png
Binary file not shown.
Binary file removed server/uploads/1699523146259_Untitled.png
Binary file not shown.

0 comments on commit f0c3a25

Please sign in to comment.