PageSourceSearch

https://skillihire.com/assets/StudentProfileEdit-Dj57cwN0.js

js skillihire.com collected 2026-10-02 01:43:47 UTC 8,756 bytes, 11 lines download raw bytes

1import{c as _,Y as I,Z as T,a7 as z,r as d,j as e,L as y,B as o,ao as D,C as u,ar as m,as as h,U as M,f as x,I as n,V as G,X as H}from"./index-DMpD5zQ4.js";import{f as U,k as Y,l as R,m as V,n as X}from"./useStudentProfile-D96dYbYk.js";import{P as W}from"./PageHero-qqH_ZB5N.js";import{T as Z}from"./textarea-BmqJYY1S.js";import{L as l}from"./label-CAB3OdUz.js";import{S as q}from"./switch-DW4WFj1t.js";import{B as J}from"./badge-bMO3_tW7.js";import{S as K}from"./slider-DT7arqiD.js";import{M as O}from"./map-pin-CFZwqK25.js";import{G as C}from"./globe-__AbA6qd.js";import{P as Q}from"./plus-BPK3OS2-.js";import{S as $}from"./save-B9sBNypQ.js";/**
2 * @license lucide-react v0.462.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const ee=_("Github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]);/**
7 * @license lucide-react v0.462.0 - ISC
8 *
9 * This source code is licensed under the ISC license.
10 * See the LICENSE file in the root directory of this source tree.
11 */const se=_("Twitter",[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}]]);function xe(){const p=I(),{user:w,loading:j}=T(),{toast:c}=z(),{data:a,isLoading:P}=U(),{data:g}=Y(),v=R(),f=V(),L=X(),[t,i]=d.useState({headline:"",bio:"",location:"",website_url:"",github_url:"",linkedin_url:"",twitter_url:"",is_public:!0}),[r,b]=d.useState({name:"",level:3}),[k,N]=d.useState(!1);if(d.useEffect(()=>{!j&&!w&&p("/login")},[w,j,p]),d.useEffect(()=>{a&&i({headline:a.headline||"",bio:a.bio||"",location:a.location||"",website_url:a.website_url||"",github_url:a.github_url||"",linkedin_url:a.linkedin_url||"",twitter_url:a.twitter_url||"",is_public:a.is_public??!0})},[a]),j||P)return e.jsx("div",{className:"min-h-screen flex items-center justify-center",children:e.jsx(y,{className:"h-8 w-8 animate-spin text-primary"})});const A=async s=>{s.preventDefault();try{await v.mutateAsync(t),c({title:"Profile updated!",description:"Your changes have been saved."})}catch{c({title:"Failed to update profile",variant:"destructive"})}},F=async()=>{if(r.name.trim())try{await f.mutateAsync({skillName:r.name.trim(),proficiencyLevel:r.level}),b({name:"",level:3}),N(!1),c({title:"Skill added!"})}catch{c({title:"Failed to add skill",variant:"destructive"})}},E=async s=>{try{await L.mutateAsync(s),c({title:"Skill removed"})}catch{c({title:"Failed to remove skill",variant:"destructive"})}},S=s=>{switch(s){case 1:return"Beginner";case 2:return"Elementary";case 3:return"Intermediate";case 4:return"Advanced";case 5:return"Expert";default:return"Intermediate"}};return e.jsxs("div",{className:"min-h-screen",children:[e.jsx(W,{badge:"👤 Profile Settings",title:e.jsxs(e.Fragment,{children:["Edit Your ",e.jsx("span",{className:"gradient-text-brand",children:"Profile"})]}),subtitle:"Customize your public profile to showcase your learning journey and skills"}),e.jsx("section",{className:"py-8 lg:py-12",children:e.jsxs("div",{className:"container mx-auto px-4 lg:px-8 max-w-3xl",children:[e.jsxs(o,{variant:"ghost",className:"mb-6",onClick:()=>p("/student-dashboard"),children:[e.jsx(D,{className:"h-4 w-4 mr-2"}),"Back to Dashboard"]}),e.jsxs("form",{onSubmit:A,className:"space-y-6",children:[e.jsxs(u,{className:"glass-card",children:[e.jsx(m,{children:e.jsxs(h,{className:"flex items-center gap-2",children:[e.jsx(M,{className:"h-5 w-5"}),"Basic Information"]})}),e.jsxs(x,{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(l,{htmlFor:"headline",children:"Headline"}),e.jsx(n,{id:"headline",placeholder:"e.g., AI/ML Enthusiast | Full Stack Developer",value:t.headline,onChange:s=>i({...t,headline:s.target.value})})]}),e.jsxs("div",{children:[e.jsx(l,{htmlFor:"bio",children:"Bio"}),e.jsx(Z,{id:"bio",placeholder:"Tell others about yourself, your learning goals, and interests...",rows:4,value:t.bio,onChange:s=>i({...t,bio:s.target.value})})]}),e.jsxs("div",{children:[e.jsx(l,{htmlFor:"location",children:"Location"}),e.jsxs("div",{className:"relative",children:[e.jsx(O,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.jsx(n,{id:"location",className:"pl-10",placeholder:"City, Country",value:t.location,onChange:s=>i({...t,location:s.target.value})})]})]})]})]}),e.jsxs(u,{className:"glass-card",children:[e.jsx(m,{children:e.jsxs(h,{className:"flex items-center gap-2",children:[e.jsx(C,{className:"h-5 w-5"}),"Social Links"]})}),e.jsxs(x,{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(l,{htmlFor:"website",children:"Website"}),e.jsxs("div",{className:"relative",children:[e.jsx(C,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.jsx(n,{id:"website",className:"pl-10",placeholder:"https://yourwebsite.com",value:t.website_url,onChange:s=>i({...t,website_url:s.target.value})})]})]}),e.jsxs("div",{children:[e.jsx(l,{htmlFor:"github",children:"GitHub"}),e.jsxs("div",{className:"relative",children:[e.jsx(ee,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.jsx(n,{id:"github",className:"pl-10",placeholder:"https://github.com/username",value:t.github_url,onChange:s=>i({...t,github_url:s.target.value})})]})]}),e.jsxs("div",{children:[e.jsx(l,{htmlFor:"linkedin",children:"LinkedIn"}),e.jsxs("div",{className:"relative",children:[e.jsx(G,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.jsx(n,{id:"linkedin",className:"pl-10",placeholder:"https://linkedin.com/in/username",value:t.linkedin_url,onChange:s=>i({...t,linkedin_url:s.target.value})})]})]}),e.jsxs("div",{children:[e.jsx(l,{htmlFor:"twitter",children:"Twitter / X"}),e.jsxs("div",{className:"relative",children:[e.jsx(se,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.jsx(n,{id:"twitter",className:"pl-10",placeholder:"https://twitter.com/username",value:t.twitter_url,onChange:s=>i({...t,twitter_url:s.target.value})})]})]})]})]}),e.jsxs(u,{className:"glass-card",children:[e.jsx(m,{children:e.jsxs(h,{className:"flex items-center justify-between",children:[e.jsx("span",{children:"Skills"}),!k&&e.jsxs(o,{type:"button",variant:"outline",size:"sm",onClick:()=>N(!0),children:[e.jsx(Q,{className:"h-4 w-4 mr-1"}),"Add Skill"]})]})}),e.jsxs(x,{children:[k&&e.jsx("div",{className:"mb-6 p-4 border rounded-lg bg-muted/50",children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(l,{children:"Skill Name"}),e.jsx(n,{placeholder:"e.g., Python, React, Machine Learning",value:r.name,onChange:s=>b({...r,name:s.target.value})})]}),e.jsxs("div",{children:[e.jsxs(l,{children:["Proficiency: ",S(r.level)]}),e.jsx(K,{value:[r.level],min:1,max:5,step:1,onValueChange:([s])=>b({...r,level:s}),className:"mt-2"})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(o,{type:"button",size:"sm",onClick:F,disabled:f.isPending,children:f.isPending?e.jsx(y,{className:"h-4 w-4 animate-spin"}):"Add"}),e.jsx(o,{type:"button",variant:"ghost",size:"sm",onClick:()=>N(!1),children:"Cancel"})]})]})}),g&&g.length>0?e.jsx("div",{className:"flex flex-wrap gap-2",children:g.map(s=>e.jsxs(J,{variant:"secondary",className:"py-2 px-3 text-sm",children:[s.skill_name,e.jsxs("span",{className:"ml-2 text-xs text-muted-foreground",children:["(",S(s.proficiency_level),")"]}),e.jsx("button",{type:"button",onClick:()=>E(s.id),className:"ml-2 hover:text-destructive",children:e.jsx(H,{className:"h-3 w-3"})})]},s.id))}):e.jsx("p",{className:"text-muted-foreground text-center py-4",children:"No skills added yet. Add your skills to showcase your expertise!"})]})]}),e.jsxs(u,{className:"glass-card",children:[e.jsx(m,{children:e.jsx(h,{children:"Privacy Settings"})}),e.jsx(x,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(l,{htmlFor:"public",children:"Public Profile"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Allow others to view your profile, achievements, and skills"})]}),e.jsx(q,{id:"public",checked:t.is_public,onCheckedChange:s=>i({...t,is_public:s})})]})})]}),e.jsxs(o,{type:"submit",size:"lg",className:"w-full hero-gradient text-primary-foreground",disabled:v.isPending,children:[v.isPending?e.jsx(y,{className:"h-4 w-4 animate-spin mr-2"}):e.jsx($,{className:"h-4 w-4 mr-2"}),"Save Changes"]})]})]})})]})}export{xe as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.