push rasad front on new repo

This commit is contained in:
2026-01-18 14:32:49 +03:30
commit 4fe6e70525
2139 changed files with 303150 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
import React, { useState } from "react";
import { Box, Input, Typography } from "@mui/material";
const ImgUploader = () => {
const [selectedImage, setSelectedImage] = useState(null);
const [imageUrl, setImageUrl] = useState(null);
const handleFileChange = (event) => {
const selectedFile = event.target.files[0];
if (selectedFile) {
const reader = new FileReader();
reader.onload = () => {
setSelectedImage(selectedFile);
setImageUrl(reader.result);
};
reader.readAsDataURL(selectedFile);
}
};
return (
<Box>
<Typography>سند:</Typography>
<Input type="file" accept="image/*" onChange={handleFileChange} />
{selectedImage && (
<Box mt={2}>
<img
src={imageUrl}
alt="img"
width="200px"
style={{ borderRadius: "10px" }}
/>
</Box>
)}
</Box>
);
};
export default ImgUploader;